const events = require('events').EventEmitter;
let emitter = new events();
emitter.on('someEvent', function(arg1, arg2) {
    console.log('listener1', arg1, arg2);
});
emitter.on('someEvent', function(arg3, arg4) {
    console.log('listener2', arg3, arg4);
});

// 触发someEvent监听器  传回两个参数1、2给function做参数
emitter.emit('someEvent', 'arg 传回参数1', 'arg 传回参数2'); 

//    listener1 arg 传回参数1 arg 传回参数2
//    listener2 arg 传回参数1 arg 传回参数2